#ifndef UPROGRESSBAR_H
#define UPROGRESSBAR_H

#include "utkwidget_export.h"
#include "style/upalette.h"
#include <QProgressBar>

class UProgressBarPrivate;
class UProgressStyleOption;
class UTKWIDGET_EXPORT UProgressBar : public QProgressBar
{
    Q_OBJECT
public:
    explicit UProgressBar(QWidget* parent = nullptr);
    ~UProgressBar();

    void setRadius(const int radius);
    void setBorderWidth(const int w);
    void setBorderRole(const UPalette::ColorType &role);
    void setBackgroundRole(const UPalette::ColorType &role);
    void setProgressRole(const UPalette::ColorType &role);

protected:
    void initStyleOption(UProgressStyleOption* option);
    void paintEvent(QPaintEvent*) override;

private:
    QScopedPointer<UProgressBarPrivate> d_ptr;
    Q_DISABLE_COPY(UProgressBar)
    Q_DECLARE_PRIVATE(UProgressBar)
};

#endif // UPROGRESSBAR_H
